<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>lwIP: src/core/ipv6/ip6_addr.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">lwIP
   &#160;<span id="projectnumber">2.1.2</span>
   </div>
   <div id="projectbrief">Lightweight IP stack</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('ip6__addr_8c.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">ip6_addr.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="opt_8h.html">lwip/opt.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="ip__addr_8h.html">lwip/ip_addr.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="def_8h.html">lwip/def.h</a>&quot;</code><br />
<code>#include &lt;string.h&gt;</code><br />
<code>#include &quot;<a class="el" href="ip4__addr_8h.html">lwip/ip4_addr.h</a>&quot;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a3f555ae302eb056f28f6cb266a27036e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ip6__addr_8c.html#a3f555ae302eb056f28f6cb266a27036e">ip6addr_aton</a> (const char *cp, <a class="el" href="ip6__addr_8h.html#aaca9e796e93a355294c4954c08d01762">ip6_addr_t</a> *addr)</td></tr>
<tr class="separator:a3f555ae302eb056f28f6cb266a27036e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adba4443e6629583d48e1d1c7c21a977e"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ip6__addr_8c.html#adba4443e6629583d48e1d1c7c21a977e">ip6addr_ntoa</a> (const <a class="el" href="ip6__addr_8h.html#aaca9e796e93a355294c4954c08d01762">ip6_addr_t</a> *addr)</td></tr>
<tr class="separator:adba4443e6629583d48e1d1c7c21a977e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64d442f35f34c43121bf91cfea2e77a2"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ip6__addr_8c.html#a64d442f35f34c43121bf91cfea2e77a2">ip6addr_ntoa_r</a> (const <a class="el" href="ip6__addr_8h.html#aaca9e796e93a355294c4954c08d01762">ip6_addr_t</a> *addr, char *buf, int buflen)</td></tr>
<tr class="separator:a64d442f35f34c43121bf91cfea2e77a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>IPv6 addresses. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a3f555ae302eb056f28f6cb266a27036e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3f555ae302eb056f28f6cb266a27036e">&#9670;&nbsp;</a></span>ip6addr_aton()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ip6addr_aton </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>cp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ip6__addr_8h.html#aaca9e796e93a355294c4954c08d01762">ip6_addr_t</a> *&#160;</td>
          <td class="paramname"><em>addr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Check whether "cp" is a valid ascii representation of an IPv6 address and convert to a binary address. Returns 1 if the address is valid, 0 if not.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cp</td><td>IPv6 address in ascii representation (e.g. "FF01::1") </td></tr>
    <tr><td class="paramname">addr</td><td>pointer to which to save the ip address in network order </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if cp could be converted to addr, 0 on failure </dd></dl>

</div>
</div>
<a id="adba4443e6629583d48e1d1c7c21a977e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adba4443e6629583d48e1d1c7c21a977e">&#9670;&nbsp;</a></span>ip6addr_ntoa()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* ip6addr_ntoa </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ip6__addr_8h.html#aaca9e796e93a355294c4954c08d01762">ip6_addr_t</a> *&#160;</td>
          <td class="paramname"><em>addr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Convert numeric IPv6 address into ASCII representation. returns ptr to static buffer; not reentrant!</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">addr</td><td>ip6 address in network order to convert </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>pointer to a global static (!) buffer that holds the ASCII representation of addr </dd></dl>

</div>
</div>
<a id="a64d442f35f34c43121bf91cfea2e77a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a64d442f35f34c43121bf91cfea2e77a2">&#9670;&nbsp;</a></span>ip6addr_ntoa_r()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* ip6addr_ntoa_r </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ip6__addr_8h.html#aaca9e796e93a355294c4954c08d01762">ip6_addr_t</a> *&#160;</td>
          <td class="paramname"><em>addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>buflen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Same as ipaddr_ntoa, but reentrant since a user-supplied buffer is used.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">addr</td><td>ip6 address in network order to convert </td></tr>
    <tr><td class="paramname">buf</td><td>target buffer where the string is stored </td></tr>
    <tr><td class="paramname">buflen</td><td>length of buf </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>either pointer to buf which now holds the ASCII representation of addr or NULL if buf was too small </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_aebb8dcc11953d78e620bbef0b9e2183.html">core</a></li><li class="navelem"><a class="el" href="dir_da9c6f43d3cd00be3de224bac907a425.html">ipv6</a></li><li class="navelem"><a class="el" href="ip6__addr_8c.html">ip6_addr.c</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
